<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>China Fullfill</title>
<link href="/css/backstage.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/backstage.js"></script>
<link href="/css/blitzer/jquery-ui.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="/js/jquery-ui.js"></script>
<script>

</script>
<style>
	html,body{text-align:center;border:none;background:none}
	#content{width:720px;text-align:left;position:relative;margin-left:auto;margin-right:auto;background:white;height:100%}
	.contentTop{height:80px;line-height:80px;width:100%;text-align:left;font-size:15px;font-weight:bold;}
	.contentBottom{height:50px;line-height:50px;width:100%;text-align:right;}
	.list{width:720px;max-height:28cm;border-collapse:collapse;margin-left:auto;margin-right:auto;}
	.list tr{height:30px}
	.list th,.list td{border:1px solid black;text-align:center;}
	.width1{width:80px;text-align:right;}
	.width2{width:170px;}
	.width3{width:100px;}
	.width4{width:150px;}
	.center{text-align:center}
	.action{cursor:pointer;marin:2px}
	.editTable td{padding:5px;text-align:left;}
	.barcode{display:inline-block;zoom:1;*display:inline;margin-left:50px;margin-bottom:0px;height:40px;overflow:hidden;margin-top:30px}
	.printTitle{display:inline-block;zoom:1;*display:inline; font-size: 30px;  margin-left: 200px;}
</style>

<script type="text/javascript">

//<{$lang.operation}><{$lang.tip}>s
function alertTip(tip) {
    $('<div title="<{$lang.order}><{$lang.exception}><{$lang.tip}>[<{$lang.print_close_tip}>]" style="text-align:left;">' + tip + '</div>').dialog({    	
		modal:true,
		show:"slide",
		width:600,
        buttons: {
            '<{$lang.close}>': function() {
                $(this).dialog("close");
            }
        }
    });
}
$(function(){
	var errlist = <{$err_orders}>;
	var html = "";
	$.each(errlist,function(k,v){
		html+=v.err+"<br/>";
	});
	if(html!=""){
		alertTip(html);
	}
});
</script>

</head>
<body>
<div id="content">
<{if isset($result)}>
	
	<{foreach from=$result item=order key=key name=detail}>
	    <{assign var="itemCount" value="0"}>
		<{foreach from=$order item=product key=key name=product}>
		<{if $itemCount == 0}>
		   <div class="contentTop">
		    <div class="barcode"><img src="/product/receiving/barcode/code/<{$product.opcode}>"/></div><div class="printTitle"><{$lang.offshelf}><{$lang.items}></div>
		  </div>
		<{/if}>
	    
		<{if $itemCount%2 == 0}>
		
		<table class="list">
		<tr>
		   <td><{$lang.op_code}></td><td colspan='2'><{$product.opcode}></td>
		   <td><{$lang.offshelfer}></td><td colspan='2'><{$product.phname}></td>
		</tr>
		<tr>
		   <td><{$lang.op_user}></td><td colspan='2'><{$product.opname}></td>
		   <td><{$lang.time}><{$lang.date}></td><td colspan='2'><{$product.date}></td>
		</tr>
		<tr>
			<th><{$lang.No}></th>
			<th><{$lang.ws_code}></th>
			<th><{$lang.sku}></th>
			<th><{$lang.name}></th>
			<th><{$lang.category}></th>
			<th><{$lang.quantity}></th>
		</tr>
		<{/if}>
		

		<{$itemCount = $itemCount+1}>
		<tr>
			<td><{$itemCount}></td>
			<td><{$product.ws_code}></td>
			<td><{$product.product_sku}></td>
			<td width="30%"><{$product.product_title}></td>
			<td width="30%"><{$product.category}></td>
			<td><{$product.count}></td>
		</tr>
		
		<{if ($itemCount+1)%2 == 0 && $itemCount!=1 }>
		    <div style="page-break-after:always"></div>
		<{/if}>
		
		<{/foreach}>
		</table>

	<{if ($itemCount+1)%2 == 0 || $smarty.foreach.detail.last}>
		
		<div class="contentBottom" style="page-break-after:always">
		<div style="height:20px;"><{$lang.offshelfer}>:__________________<div style="width:50px;display:inline-block;zoom:1;*display:inline"></div></div><div><{$lang.offshelf}><{$lang.date}>:__________________<div style="width:50px;display:inline-block;zoom:1;*display:inline"></div></div>
	</div>
	<{/if}>
	<{/foreach}>
<{/if}>
</div>

</body>
</html>